<!DOCTYPE html>
<html class="js cssanimations" lang="en"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <link rel="stylesheet" href="../static/css/user/amazeui.css">
    <link rel="stylesheet" href="../static/css/user/amazeui_002.css">
    <link rel="stylesheet" href="../static/css/user/custom_up_img.css">

    <link rel="stylesheet" href="../static/css/user/reset.css">
    <link rel="stylesheet" href="../static/css/user/commone.css">
    <link rel="stylesheet" media="screen and (min-width:481px)" href="../static/css/user/usercenter_002.css">
    <link rel="stylesheet" media="screen and (max-width:480px)" href="../static/css/user/usercenter.css">

    <script src="../../static/js/hm.js"></script>
    <script type="text/javascript">
    var basePath ="/";
    </script>
    <script src="../static/js/jquery-3.js"></script>
    <script src="../../static/layui/lay/modules/layer.js"></script>
    <script src="../static/js/userMessage.js"></script>
    <link rel="stylesheet" href="../../static/layui/css/modules/layer/default/layer.css" id="layuicss-layer">
    <title>个人中心</title>


    <script src="../static/js/amazeui.js"></script>
    <script src="../static/js/cropper.js"></script>
</head>
<body>
    <div class="content">
        
 <div class="content-top">
            <div class="content-top-info">
                <div class="content-top-left">
                    <div class="left-logo">
                        <a href="https://www.hasbei.com/" class="logo-info" target="_self"><img src="../static/image/logo.png" alt="有贝口腔网"></a>
                    </div>
                    <ul class="right-list">
                        <li><a href="https://www.hasbei.com/zx" target="_self"><img src="../static/image/news-icon.png" alt="有贝口腔网"><span>资讯</span></a></li>
                        <li><a href="https://www.hasbei.com/qa" target="_self"><img src="../static/image/qa-icon.png" alt="有贝口腔网"><span>问答</span></a></li>
                    </ul>
                </div>
                <form action="/search" method="get">
                	<div class="content-top-right">
	                    <div class="search-input">
	                    	<img class="search-icon" src="../static/image/icon_Search.png">
	                        <input class="top-search" type="text" name="kw" placeholder="请输入资讯、问题搜索">
	                        <input class="search-sub" type="submit" value="搜索">
	                    </div>
	                    
	                    
                        <div class="land-success">
                            <script type="text/javascript">
                                function setPwd(){
                                    layer.open({
                                        type: 2,
                                        title: "设置登录密码",
                                        shadeClose: false,
                                        area: ['600px', '300px'],
                                        fixed: false,
                                        maxmin: false,
                                        content: basePath+'updatePwd'
                                    });

                                }

                                function setEmail(){
                                    layer.msg("该功能还在开发中,不好意思")
                                   /* layer.open({
                                        type: 2,
                                        title: "设置电子邮箱",
                                        shadeClose: false,
                                        area: ['600px', '250px'],
                                        fixed: false,
                                        maxmin: false,
                                        content: basePath+'updateEmail'
                                    });*/
                                }

                            </script>
                        	  <div class="message-notice">
	                            <a href="https://www.hasbei.com/user/center/msgindex"><img src="../static/image/notice.png" alt="有贝口腔网"><span class="notice-tip" id="msgCount" style="display:none">0</span></a>
	                            <div class="notice-modul" id="myNoticeModul"><a href="https://www.hasbei.com/user/center/msgindex">站内消息<span class="tips-num">0</span></a></div> 
	                        </div>
	                         <div class="land-success-img">
	                            <a href="https://www.hasbei.com/user/center/index">
                                <img src="../static/image/69cb5aa91de047839ae0fad1c8897c77.png">
                                <span class="land-success-name">[[${userPO.nick}]]</span>
	                            </a>
	                            <div class="img-posi-div">
	                                <a th:href="@{'/message/'+${userPO.email}}"><span>个人信息</span></a>
	                                <a href="javascript:;" onclick="loginOut()"><span>退出登录</span></a>
	                            </div>
	                        </div>
	    
                    	</div>
                	</div>
                 </form>
            </div>
</div>


        <div class="content-main">
            <div class="main-info">
                <div class="main-user-left">

<div class="user-left-card info-card">
    <div class="user-img"><img th:src="${userPO.lcon == null ? '/static/image/timg.jpg':userPO.lcon} "></div>
    <div class="usertop-for-phone">
    <div class="user-name">[[${userPO.nick}]]</div>
    <div class="user-style">[[${userPO.sign}]]</div>
    <div class="user-editor">
        <a th:href="@{'/homepage/'+${userPO.email}}" target="_blank">
            <span>个人主页</span>
        </a>
    </div>
    </div>
</div>
<div class="user-left-card">
    <div class="card-flex">
        <div class="user-inter"><a href="javascript:"><span class="user-inter-num">[[${integer}]]</span><span>提问</span></a></div>
        <div class="line"></div>
        <div class="user-inter"><a href="javascript:"><span class="user-inter-num">[[${in}]]</span><span>回答</span></a></div>
        <div class="line"></div>
        <div class="user-inter"><a href="javascript:"><span class="user-inter-num">[[${integer1}]]</span><span>文章</span></a></div>
    </div>
</div> 
<div class="user-left-card">
<div class="user-editor">
        <a th:href="@{'/center/'+${userPO.email}}">
        	<img class="tip-img" src="../static/image/usercenter.png" alt="有贝口腔网">
            <span>个人中心</span>
            <img class="bottom-right" src="../static/image/arrow-bttom.png" alt="有贝口腔网">
        </a>
</div>
<div class="user-editor user-editor-active">
        <a th:href="@{'/message/'+${userPO.email}}">
        	<img src="../static/image/Write.png" alt="有贝口腔网">
            <span>个人信息</span>
            <img class="bottom-right" src="../static/image/arrow-bttom.png" alt="有贝口腔网">
        </a>
</div>
<div class="user-editor">
        <a href="https://www.hasbei.com/user/center/msgindex">
        	<img src="../static/image/notice-lan.png" alt="有贝口腔网">
            <span>站内消息</span>
            <img class="bottom-right" src="../static/image/arrow-bttom.png" alt="有贝口腔网">
        </a>
</div>
</div> 

</div>


                <div class="main-user-right">

                    <div class="user-info-editor">
                        <div class="editor-top">
                            <h2>个人信息</h2>
                            <a href="https://www.hasbei.com/user/center/index" class="go-center"><span>返回个人中心主页</span><img src="../static/image/arrow-bttom.png" alt="有贝口腔网"></a>
                        </div>

                        <div class="change-info">
                            <div class="change-info-top">
                                <div class="change-info-defa">
                                    <div class="defa-img"><a href="javascript:;"><img th:src="${userPO.lcon == null ? '/static/image/timg.jpg':userPO.lcon} " alt="有贝口腔网"></a></div>
                                    <div class="defa-text">
                                        <h3 class="h3-name">[[${userPO.nick}]]</h3>
                                        <p class="p-style">[[${userPO.sign}]]</p>
                                    </div>
                                </div>
                                <div class="change-info-btn">修改信息</div>
                            </div>

                            <div class="change-info-show" style="display: none;">
                            	<div class="change-show-img">
                                	<div class="up-img-cover" id="up-img-touch">
                                        <img class="am-circle" id="user-photo" th:src="${userPO.lcon == null ? '/static/image/timg.jpg':userPO.lcon} ">
                                        <input type="file" id="imgId" name="imgName"/>
                                        <span class="change-img-btn">更换头像</span>

                                    </div>
                                    <!--图片上传框弹框-->
                                 <!--   <div class="am-modal am-modal-no-btn up-frame-bj " tabindex="-1" id="doc-modal-1">
                                        <div class="am-modal-dialog up-frame-parent up-frame-radius">
                                            <div class="am-modal-hd up-frame-header">
                                                <label>上传头像</label>
                                                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a>
                                            </div>
                                            <div class="am-modal-bd  up-frame-body">
                                                <div class="am-g am-fl">
                                                    <div class="am-form-group am-form-file">
                                                        <div class="am-fl">
                                                            <button type="button" class="am-btn am-btn-default am-btn-sm choose-img">选择要上传的图片</button>
                                                        </div>
                                                        <input type="file" id="inputImage">
                                                    </div>
                                                </div>
                                                <div class="am-g am-fl">
                                                    <div class="up-pre-before up-frame-radius">
                                                        <img alt="" src="" id="image">
                                                    </div>
                                                    <div class="up-pre-after up-frame-radius">
                                                    </div>
                                                </div>
                                                <div class="am-g am-fl">
                                                    <div class="up-control-btns">
                                                        <span id="up-btn-ok">提交</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>-->
                                    
                                 </div>   
                                <div class="writer-area">
                                    <div class="write-box">
                                        <p class="write-box-p">
                                            <input class="write-box-input" placeholder="输入你的昵称" maxlength="20" type="text" th:value="${userPO.nick}">
                                            <span class="write-box-span"><i>0</i>/20</span>
                                        </p>
                                        <p class="weite-box-tip">2-20个汉字，请勿使用包含特殊符号或含有明显营销推广意图的媒体名</p>
                                    </div>
                                    <div class="write-box">
                                        <p class="write-box-p">
                                            <textarea class="write-box-textarea" placeholder="不要做懒人，给自己一个介绍吧" maxlength="250" type="text">[[${userPO.sign}]]</textarea>
                                            <span class="write-box-right"><i>0</i>/250</span>
                                        </p>
                                        <p class="weite-box-tip">良好的简介内容更容易收获用户的关注。填写建议个人介绍，内容介绍</p>
                                    </div>
                                    <div class="sub-btn">
                                        <div class="anniu sure-btn">保存</div>
                                        <div class="anniu close-btn">取消</div>
                                    </div>
                                </div>
                            </div>

                            <div class="login-other">
                                <div class="login-other-title">登录方式</div>
                                <div class="login-other-type">
                                    <div class="login-other-list">
                                       <!-- <div>
                                            <span class="change-obj">绑定手机</span>
                                            <span class="change-obj-show">暂无绑定</span>
                                        </div>
                                        <div class="change-obj-btn" onclick="setPhone()">设置修改手机号</div>-->
                                    </div>
                                    <div class="login-other-list">
                                        <div>
                                            <span class="change-obj">修改邮箱</span>
                                            <span class="change-obj-show">[[${userPO.email}]]</span>
                                        </div>
                                        <div class="change-obj-btn" onclick="setEmail()">设置修改邮箱</div>
                                    </div>
                                    <!-- <div class="login-other-list">
                                        <div class="login-three">
                                            <span class="change-obj">第三方登录</span>
                                            <a href=""><img src="/static/images/icon_qq.png" alt="有贝口腔网"></a>
                                            <a href=""><img src="/static/images/icon_Wechat.png" alt="有贝口腔网"></a>
                                            <a href=""><img src="/static/images/icon_Twitter.png" alt="有贝口腔网"></a>
                                        </div>
                                    </div> -->
                                </div>
                            </div>
                            <div class="login-other">
                                <div class="login-other-title">安全设置</div>
                                <div class="login-other-type">
                                    <div class="login-other-list">
                                        <div>
                                            <span class="change-obj">密码设置</span>
                                            <span class="change-obj-show"></span>
                                        </div>
                                        <div class="change-obj-btn" onclick="setPwd()">设置登录密码</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                
            </div>
        </div>

        <input type="hidden" id="uid" th:value="${userPO.id}"/>

        <!--底部-->
        <th:block th:include="comment/button::button"/>

    </div>
<!--<script>

/* $("li").click(function(){
    $("li").removeClass("select-active");
    $(this).addClass("select-active");
}) */



$(".change-info-show").hide();
$(".change-info-btn").click(function(){
    $(".change-info-top").hide();
    $(".change-info-show").show();
})
$(".write-box-input").change(function(){
    var inputle = $(this).val().length;
    $(".write-box-span i").text(inputle);
})
$(".write-box-textarea").change(function(){
    var textareale = $(this).val().length;
    $(".write-box-right i").text(textareale);
})
$(".write-box-input").focus(function(){
    $(this).parent().css("border-color","rgba(41,167,230,1)");
})
$(".write-box-input").blur(function(){
    $(this).parent().css("border-color","#ddd");
})
$(".write-box-textarea").focus(function(){
    $(this).parent().css("border-color","rgba(41,167,230,1)");
})
$(".write-box-textarea").blur(function(){
    $(this).parent().css("border-color","#ddd");
})


$(".sure-btn").click(function(){
    var inputval = $(".write-box-input").val();
    var textareaval =$(".write-box-textarea").val();
    if(inputval == ""){
        layer.msg("请输入昵称");
        return false;
    }
    $(".h3-name").text(inputval)F;
    $(".p-style").text(textareaval);
	//更新用户信息
    updateUserInfo(inputval,textareaval);
})
$(".close-btn").click(function(){
    $(".change-info-show").hide();
    $(".change-info-top").show();
})


// 修改手机号/邮箱
function setPhone(obj){
	layer.open({
        type: 2,
        title: "设置手机号码",
        shadeClose: false,       
        area: ['600px', '250px'],
        fixed: false,           
        maxmin: false, 
        content: basePath+'user/center/setPhone'
    });
}
function setEmail(obj){
	layer.open({
        type: 2,
        title: "设置电子邮箱",
        shadeClose: false,       
        area: ['600px', '250px'],
        fixed: false,           
        maxmin: false, 
        content: basePath+'user/center/setEmail'
    });
}
function setPwd(obj){
	layer.open({
        type: 2,
        title: "设置登录密码",
        shadeClose: false,       
        area: ['600px', '300px'],
        fixed: false,           
        maxmin: false, 
        content: basePath+'user/center/setPwd'
    });
}

//更新用户信息
var logo="";
function updateUserInfo(nick,desc){
	$.post(basePath+"user/center/updateUserInfo?nick="+nick+"&userDesc="+desc+"&logo="+logo,function(data){
        if(data.success){
        	layer.msg("保存成功");
        	$(".change-info-show").hide();
            $(".change-info-top").show();
            location.reload();
        }else{
        	layer.msg(data.msg);


        }
    });
}




</script>-->


    
    


</body></html>